import { runCommand } from "../common/utils.js";

// json结果输出审计结果
export async function npmAudit(workDir) {
    // const cmd = 'npm audit --json --registry=https://registry.npmjs.org';
    const cmd = 'npm audit --json ';
    const jsonResult = await runCommand(cmd, workDir);
    return JSON.parse(jsonResult);
}